/*
 * @Description:
 * @Author: zhaolei
 * @Date: 2023-04-19 11:56:10
 */

import request from '@/router/axios';

// 管理端基地宠物档案查看预约记录
export function fetchListByPetId(query) {
  return request({
    url: '/core/reserve/pet/page',
    method: 'get',
    params: query,
  });
}

// 基地宠物档案查看预约记录/根据id查询预约详情
export function getAppointDetailById(id) {
  return request({
    url: `/core/reserve/pet/${id}`,
    method: 'get',
  });
}

// 预约记录列表查询
export function fetchList(query) {
  return request({
    url: '/core/reserve/admin/page',
    method: 'get',
    params: query,
  });
}

// 预约记录列表通过id查询预约详情
export function getObj(id) {
  return request({
    url: `/core/reserve/${id}`,
    method: 'get',
  });
}

// 确认预约申请
export function confirmObj(data) {
  return request({
    url: `/core/reserve/confirm`,
    method: 'put',
    data,
  });
}

// 关闭预约申请
export function closeObj(data) {
  return request({
    url: `/core/reserve/close`,
    method: 'put',
    data,
  });
}
//猫咪信息
export function getPetInformation(id) {
  return request({
    url: `/core/give/reserve/cat/${id}`,
    method: 'get',
  });
}
